<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('应用名称')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-channel_id" data-rule="required" class="form-control selectpicker" name="row[channel_id]">
                <option value="">请选择</option>
                {foreach name="channelIdList" item="vo"}
                <option value="{$key}" {in name="key" value="$_REQUEST['channel_id']"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                <option value="">请选择</option>
                {foreach name="typeList" item="vo"}
                <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Botton')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-botton" data-rule="required,length(~2)" class="form-control" name="row[botton]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required,length(~17)" class="form-control" name="row[title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-desc" data-rule="length(~16)" class="form-control" name="row[desc]" type="text">
        </div>
    </div>

    <div id="add_nums" style="display: none" class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Add_nums')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-add_nums"  class="form-control" name="row[add_nums]" type="number">
        </div>
    </div>
    <div class="form-group" id="max_nums" style="display: none">
        <label id="max_title" class="control-label col-xs-12 col-sm-2">{:__('Max_nums')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-max_nums"  class="form-control" name="row[max_nums]" type="number">
        </div>
    </div>
    <div class="form-group" id="price" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price"  class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
        </div>
    </div>

    <div class="form-group" id="appid" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('跳转小程序appid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-appid"  class="form-control"  name="row[appid]" type="text" value="">
        </div>
    </div>

    <div class="form-group" id="path" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('跳转小程序路径')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-path"  class="form-control"  name="row[path]" type="text" value="">
        </div>
    </div>

    <div class="form-group" id="img" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('公众号二维码')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-img"  class="form-control" size="50" name="row[img]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-img" class="btn btn-danger faupload" data-input-id="c-img" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-img"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-img" class="btn btn-primary fachoose" data-input-id="c-img" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-img"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-img"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
